cmake_minimum_required(VERSION 3.0.0)
project(ait_convert VERSION 0.1.0)

#compile options
add_compile_options(-std=c++11)

IF(NOT DEFINED $ENV{CANN_HOME})
    set(ASCEND_HOME /usr/local/Ascend)
    set(ASCEND_TOOLKIT_HOME ${ASCEND_HOME}/ascend-toolkit/latest)
ENDIF()


add_definitions(-D_GLIBCXX_USE_CXX11_ABI=0)

LINK_DIRECTORIES(
    $ENV{AIE_DIR}/lib
    $ENV{CANN_HOME}/x86_64-linux/lib64
    $ENV{CANN_HOME}/aarch64-linux/lib64
)

ADD_EXECUTABLE(ait_convert ait_convert.cpp)

TARGET_INCLUDE_DIRECTORIES(ait_convert PUBLIC
    $ENV{AIE_DIR}/include
)

TARGET_LINK_LIBRARIES(ait_convert PUBLIC ascendie)
